﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Serialization;

using ChemProV.PFD;
using ChemProV.PFD.ProcessUnits;
using ChemProV.PFD.Streams.PropertiesTable;

namespace ChemProV.PFD.Streams
{
    public interface IStream : IPfdElement, IXmlSerializable
    {

        /// <summary>
        /// Reference to the stream's source PFD element
        /// </summary>
        IProcessUnit Source
        {
            get;
            set;
        }

        /// <summary>
        /// Reference to the stream's destination PFD element
        /// </summary>
        IProcessUnit Destination
        {
            get;
            set;
        }

        /// <summary>
        /// Reference to the stream's table PFD element
        /// </summary>
        IPropertiesTable Table
        {
            get;
            set;
        }

        /// <summary>
        /// this holds the stream and the polygon for the arrow.
        /// </summary>
        StreamDestinationIcon StreamDestination
        {
            get;
            set;
        }

        /// <summary>
        /// this holds the stream and the rectangle for the rectangle at the beginning of the stream
        /// </summary>
        StreamSourceIcon StreamSource
        {
            get;
            set;
        }

        /// <summary>
        /// Can be called to manually update the stream's location
        /// </summary>
        void UpdateStreamLocation();

        event MouseButtonEventHandler Arrow_MouseButtonLeftDown;
        event MouseButtonEventHandler Tail_MouseButtonLeftDown;
        
    }
}
